<?php
/**
 * The html template file of index method of blog module of ZenTaoPHP.
 *
 * The author disclaims copyright to this source code.  In place of
 * a legal notice, here is a blessing:
 * 
 *  May you do good and not evil.
 *  May you find forgiveness for yourself and forgive others.
 *  May you share freely, never taking more than you give.
 */
?>
<?php include '../../common/view/header.html.php';?>
 <div id="summarize" class="alarm_mynews">
    <div class="main_title">网站概览<span class="level_divide">&gt; &gt;</span>网站状态(<span style="color:#F03">状态每30分钟更新一次</span>)</div>
    <div class="main_body">
        <div id="report_title">
              <div class="right">
                <span id="search_lab">关键字：</span>
                <div id="item_search" style="float:left">
                    <input type="text" name="key_word" id="key_word" class="" value="<?php if(isset($_GET['key_word'])) echo $_GET['key_word']; ?>" style="width:160px;" placeholder="请输入关键词"/>
                    <span class="status_lab">网站类型:</span>
                    <div class="dropdown">
                      <select name="type_id" id="type_id">
                        <option value="all" <?php if(isset($_GET['type_id'])&&$_GET['type_id']=="all"){echo 'selected="selected"';}?>>全部</option>
                        <?php foreach($type_info as $key=>$val){?>
                        <option value="<?php echo $val->type_id;?>" <?php if(isset($_GET['type_id'])&&$_GET['type_id']==$val->type_id){echo 'selected="selected"';}?>><?php echo $val->type_name?></option>
                        <?php }?>
                    </select>
                    </div>
                    <span class="status_lab">所在区域:</span>
                    <div class="dropdown">
                       <select name="area_id" id="area_id">
                    	<option value="all" <?php if(isset($_GET['area_id'])&&$_GET['area_id']=="all"){echo 'selected="selected"';}?>>全部</option>
                        <?php foreach($area_info as $key=>$val){?>
                        <option value="<?php echo $val->id;?>" <?php if(isset($_GET['area_id'])&&$_GET['area_id']==$val->id){echo 'selected="selected"';}?>><?php echo $val->name?></option>
                        <?php }?>
                    </select>
                    </div>
                    <span class="status_lab">所属单位:</span>
                    <div class="dropdown">
                      <select name="unit_id" id="unit_id">
                        <option value="all" <?php if(isset($_GET['unit_id'])&&$_GET['unit_id']=="all"){echo 'selected="selected"';}?>>全部</option>
                     <?php foreach($unit_info as $key=>$val){?>
                        <option value="<?php echo $val->unit_id;?>" <?php if(isset($_GET['unit_id'])&&$_GET['unit_id']==$val->unit_id){echo 'selected="selected"';}?>><?php echo $val->unit_name?></option>
                     <?php }?>
                    </select>
                    </div>
				<!--
                    <span class="status_lab">源域名访问情况:</span>
                    <div class="dropdown">
                      <select name="source_status" id="source_status">
                        <option value="all" <?php if(isset($_GET['source_status'])&&$_GET['source_status']=="all"){echo 'selected="selected"';}?>>全部</option> 
                        <option value="1" <?php if(isset($_GET['source_status'])&&$_GET['source_status']=='1'){echo 'selected="selected"';}?>>能访问</option> 
                        <option value="0" <?php if(isset($_GET['source_status'])&&$_GET['source_status']=='0'){echo 'selected="selected"';}?>>不能访问</option> 
                    </select>
                    </div>
				-->
                    <span class="status_lab">ipv6链接状态:</span>
                    <div class="dropdown">
                      <select name="ipv6_status" id="ipv6_status">
                        <option value="all" <?php if(isset($_GET['ipv6_status'])&&$_GET['ipv6_status']=="all"){echo 'selected="selected"';}?>>全部</option> 
                        <option value="1" <?php if(isset($_GET['ipv6_status'])&&$_GET['ipv6_status']=='1'){echo 'selected="selected"';}?>>正常运作</option> 
                        <option value="0" <?php if(isset($_GET['ipv6_status'])&&$_GET['ipv6_status']=='0'){echo 'selected="selected"';}?>>非正常运作</option> 
                    </select>
                    </div>
				
				<!--
                    <span class="status_lab">链接状态:</span>
                    <div class="dropdown">
                      <select name="source_status" id="source_status">
                        <option value="all" <?php if(isset($_GET['net_status'])&&$_GET['net_status']=="all"){echo 'selected="selected"';}?>>全部</option> 
                        <option value="1" <?php if(isset($_GET['net_status'])&&$_GET['net_status']=='1'){echo 'selected="selected"';}?>>正常运作</option> 
                        <option value="0" <?php if(isset($_GET['net_status'])&&$_GET['net_status']=='0'){echo 'selected="selected"';}?>>非正常运作</option> 
                    </select>
                    </div>
				-->
					<a href="javascript:void(0);" class="search" onClick="startSearch('overview','overview','key_word','type_id','area_id','unit_id','ipv6_status')" title="查找"></a>
                </div> 
            </div>  
        </div>
        <table class="table">
            <thead>
                <tr>
                    <td width="30px">序号</td>
                    <td>网站名称</td>
                    <td>主域名</td>
                    <td width="50">IPv6前缀</td>
                    <td>网站类型</td>
                    <td>所属区域</td>
                    <td>所属单位</td>
				<!--
                    <td width="100">源域名访问情况</td>
				-->
                    <td width="100">ipv6链接状态</td>
				
				<!--
					<td width="100">ipv6链接状态</td>
				-->
                </tr>
            </thead>
            <tbody>
             <?php foreach($sites_info_list as $item):?>
              <tr>
                <td><?php echo $item->sites_id;?></td>
                <td><?php echo $item->sites_name;?></td>
                <td><?php echo $item->main_domain;?></td>
                <td><?php echo $item->pre_v6;?></td>
                <td><?php echo $item->type_name;?></td>
                <td><?php echo $item->area_name;?></td>
                <td><?php echo $item->unit_name;?></td>
            <!--    <td 
				    <?php 
                        if($item->source_status==1){
                            echo 'style="background:#0F0"';
                        }else{
                            echo 'style="background:#F00"';
                        }
                    ?>
                >
				<?php 
					if($item->source_status==1){
						echo '能访问';
					}else{
						echo '不能访问';
					}
					?>
                </td>
			-->
                <td 
                    <?php 
						if($item->ipv6_status==1){
							echo 'style="background:#0F0"';
						}else{
							echo 'style="background:#F00"';
						}
				    ?>
                >
				<?php 
				   if($item->ipv6_status==1){
						echo '正常运作';
				   }else{
						echo '非正常运作';
				   }
				 ?>
                </td>
			
			<!--
				<td 
				    <?php 
                        if($item->net_status==1){
                            echo 'style="background:#0F0"';
                        }else{
                            echo 'style="background:#F00"';
                        }
                    ?>
                ><?php 
					if($item->net_status==1){
						echo '正常运作';
					}else{
						echo '非正常运作';
					}
					?>
                </td>
			-->
              </tr>  
              <?php endforeach;?>  
            </tbody>
        </table>
      <div class="pages">
        <?php 
             // echo html::a(inlink('create'), $lang->blog->add, '', "class='btn btn-primary'");
              $pager->show('right', 'full');
         ?>
        </div>
         </div>
    </div>

<?php include '../../common/view/footer.html.php';?>
<script src="<?php echo $jsRoot?>iDialog/jquery.iDialog.js" dialog-theme="default"></script>
